import { request } from "@/utils/request"
//注册发送验证码
export function sendVerificationAPI (data) {
  return request({
    url: 'signIn/send_verification',
    method: 'get',
    params: data
  })
}
//注册
export function signIn (data) {
  return request({
    url: 'signIn/signin',
    method: 'post',
    data: data
  })
}
//前台登录
export function logIn (data) {
  return request({
    url: 'signIn/login',
    method: 'post',
    data: data
  })
}
//修改用户名
export function change (data) {
  return request({
    url: 'user/reset/username',
    method: 'post',
    data: data
  })
}
//后台登录
export function backLogIn (data) {
  return request({
    url: 'signIn/backLogin',
    method: 'post',
    data: data
  })
}
//病例列表获取
export function getCaseList (data) {
  return request({
    url: 'cases/list',
    method: 'get',
    params: data
  })
}
//获取病例详细信息
export function getCase (data) {
  return request({
    url: 'cases',
    method: 'get',
    params: data
  })
}
//获取病例图片
export function getCasePhoto (data) {
  return request({
    url: 'photo/PhotoInfo',
    method: 'get',
    params: data
  })
}
//获取病例视频
export function getCaseVideo (data) {
  return request({
    url: 'video/videoInfo',
    method: 'get',
    params: data
  })
}
//下载病例图片
export function downloadCasePhoto (data) {
  return request({
    url: 'photo/download',
    method: 'get',
    params: data,
    responseType: 'arraybuffer'
  })
}
//下载病例视频
export function downloadCaseVideo (data) {
  return request({
    url: 'video/download',
    method: 'post',
    data: data
  })
}
//上传病例图片
export function uploadCasePhoto (data) {
  return request({
    url: 'photo/upload',
    method: 'post',
    data: data,
  })
}
export function uploadCaseVideo (data) {
  return request({
    url: 'video/upload',
    method: 'post',
    data: data,
  })
}
//考试试卷列表获取
export function getTestList (data) {
  return request({
    url: 'paper/searchPaper',
    method: 'post',
    data: data
  })
}

//获取考试试题
export function getTestQues (data) {
  return request({
    url: 'paper/getQuestions',
    method: 'post',
    params: data
  })
}

//获取所有用户
export function getAllUsers () {
  return request({
    url: 'user/listAll',
    method: 'get'
  })
}
//搜索用户
export function searchUsers (data) {
  return request({
    url: 'user/search',
    method: 'post',
    data: data
  })
}
//更改权限
export function uploadRole (data) {
  return request({
    url: 'user/update/role',
    method: 'get',
    params: data
  })
}
//更改密码
export function uploadPwd (data) {
  return request({
    url: 'user/reset/password',
    method: 'post',
    data: data
  })
}
//删除用户
export function userDelete (data) {
  return request({
    url: 'user/delete',
    method: 'get',
    params: data
  })
}
//新建病例
export function uploadCreate (data) {
  return request({
    url: 'cases/add',
    method: 'post',
    data: data
  })
}
//上传text
export function uploadText (data) {
  return request({
    url: 'text/upload',
    method: 'post',
    data: data
  })
}
//删除用例
export function deleteCase (data) {
  return request({
    url: 'cases/delete',
    method: 'put',
    params: data
  })

}
//3d查询
export function search3D (data) {
  return request({
    url: '3d/search',
    method: 'get',
    params: data
  })
}
//3d更新
export function update3D (data) {
  return request({
    url: '3d/update',
    method: 'put',
    params: data
  })
}
//3dlist
export function list3D (data) {
  return request({
    url: '3d/list',
    method: 'get',
    params: data
  })
}